<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>资产负债表</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="资产负债表">
<meta name="description" content="资产负债表">
<meta name="author" content="yinqi">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  <style>
    .col-lg-12{
      margin: auto;
    top: 17px;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    }
  </style>
<body>
<div class="lyear-layout-web" id="app">
  <div class="lyear-layout-container">
    <!--左侧导航-->

    <!--End 左侧导航-->
    
    <!--头部信息-->
 
    <!--End 头部信息-->
    
    <!--页面主要内容-->

    <main class="lyear-layout-content" >
      <div class="container-fluid">
        
        <div class="row">
          <div class="col-lg-12" >
            <div class="card">
              <div class="card-toolbar clearfix">
                <h3 align="center">资产负债表</h3>
                <form class="pull-right search-bar" method="get" action="#!" role="form">
                  <div class="input-group">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                    
                    </div>
                    <div class="block" style="margin-left: -33px;">
                      <el-date-picker
                        v-model="assetsliabilities.zcCdate"
                        type="datetime"
                        placeholder="选择日期时间"
                        align="right"
                        :picker-options="pickerOptions"
                        v-on:keyup.enter="getlist(1)"
                        >
                      </el-date-picker>
                      <el-button @click="getlist(1)">确定</el-button>
                    </div>
                  </div>
                </form>
                <div class="toolbar-btn-action">
                
                </div>
              </div>
              <div class="card-body">
                
                <div class="table-responsive">
                  <table class="table table-bordered">
                    <template>
                      <el-table
                        v-loading="loading"
                        element-loading-text="拼命加载中"
                        :data="list"
                        border
                        style="width: 100%">
                        <el-table-column
                          prop="zcAssets"
                          label="资产"
                          >
                        </el-table-column>
                        <el-table-column
                          prop="zcLine"
                          label="行次"
                          >
                        </el-table-column>
                        <el-table-column
                          prop="zcEndingBalance"
                          label="期末余额"
                          >
                        </el-table-column>
                        <el-table-column
                          prop="zcBeginningBalance"
                          label="年初余额"
                          >
                        </el-table-column>
                        <el-table-column
                        prop="zcLiabilities"
                        label="和所有者权益"
                        >
                      </el-table-column>
                      <el-table-column
                      prop="zcLine2"
                      label="行次"
                      >
                    </el-table-column>
                    <el-table-column
                      prop="zcEndingBalance2"
                      label="期末余额"
                      >
                    </el-table-column>
                    <el-table-column
                      prop="zcBeginningBalance2"
                      label="年初余额"
                      >
                    </el-table-column>
                 
                      </el-table>
                      
                    </template>
                  </table>
                </div>
                
                <!-- 添加模态框（Modal） -->
                <form action=""  class="form-horizontal" role="form">
                  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                      <div class="modal-dialog">
                          <div class="modal-content">
                              <div class="modal-header">
                                  <h4 class="modal-title" id="myModalLabel">
                                      账套新增
                                  </h4>
                                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                      &times;
                                  </button>
                              </div>
                              <div class="modal-body" style="height: 100%;">
                                <div class="form-group">
                                  <label for="lastname" class="col-sm-3 control-label">单位名称</label>
                                  <div class="col-sm-7">
                                    <input class="form-control" type="text" v-model="user.ztName" placeholder="单位名称">
                                  </div>
                                   </div>
                              <div class="form-group">
                                <label for="lastname" class="col-sm-3 control-label">账套管理权限</label>
                                <div class="col-sm-7">
                                  <input class="form-control" type="text" v-model="user.ztRoot"  placeholder="账套管理权限">
                                </div>
                            </div>
                                  
                              </div>
                              <div class="modal-footer">
                                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                  <el-button id="button" data-dismiss="modal"  class="btn btn-default" type="primary" :loading="loading" @click="accountdd()"  >提交</el-button>

                              </div>
                          </div>
                      </div>
                  </div>
                </form>
<!-- 修改模态框（Modal） -->
<form action=""  class="form-horizontal" role="form">
  <div class="modal fade" id="myModalup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
          <div class="modal-content">
              <div class="modal-header">
                  <h4 class="modal-title" id="myModalLabel">
                    编辑账套
                  </h4>
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                      &times;
                  </button>
              </div>
              <div class="modal-body" style="height: 100%;">
                   <div class="form-group">
                    <label for="lastname" class="col-sm-3 control-label">单位名称</label>
                    <div class="col-sm-7">
                      <input class="form-control" type="text" v-model="user1.ztName" placeholder="单位名称">
                    </div>
                     </div>
                     <!-- <div class="form-group">
                      <label for="lastname" class="col-sm-3 control-label">当前记账年份</label>
                      <div class="col-sm-7">
                        <input class="form-control" type="text" v-model="user1.ztCdate" placeholder="当前记账年份">
                      </div>
                  </div> -->
                  <div class="form-group">
                    <label for="lastname" class="col-sm-3 control-label">账套启用年份</label>
                    <div class="col-sm-7">
                      <input class="form-control" type="text" v-model="user1.ztCreadate" placeholder="账套启用年份">
                    </div>
                </div>
                <div class="form-group">
                  <label for="lastname" class="col-sm-3 control-label">账套管理权限</label>
                  <div class="col-sm-7">
                    <input class="form-control" type="text" v-model="user1.ztRoot" placeholder="账套管理权限">
                  </div>
                  
              </div>
              <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <el-button id="button" data-dismiss="modal"  class="btn btn-default" type="primary" :loading="loading" @click="accountup()">提交</el-button>

              </div>
          </div>
      </div>
  </div>
</form>
              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/vue/2.6.9/vue.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.0/axios.min.js"></script>

<!-- 引入样式 -->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<script>
  new Vue({
    el:"#app",
  data:{
    list:[],
    menu:[],
    loading: false,
    assetsliabilities:{},
    currentPage:1, //当前页码
    size:5, 
    totals:"",
    prePage:1,
    nextPage:1,
    totalPage:1, //总页数

        pickerOptions:'',
        pickerOptions: {
          shortcuts: [{
            text: '今天',
            onClick(picker) {
              picker.$emit('pick', new Date());
            }
          }, {
            text: '昨天',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit('pick', date);
            }
          }, {
            text: '一周前',
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', date);
            }
          }]
        },

    sels: [],//选中显示的值
    selsadd: [],//选中显示的值
    selsup: [],//选中显示的值

    disabled:true,
    user:{},
    user1:{},
    roleid:"",
    menuup:{}
  },
  created () {
    this.getlist(1);
  },
  methods: {
    
    getlist(currentPage){
     
      

      this.loading=true;
      setTimeout(() => {
      this.loading = false;
      axios.post("http://localhost:8888/cashflow/selectAll/",this.assetsliabilities)
      .then(res => {
        // this.list = res.data
        this.list = res.data;
       
      })
      .catch(err => {
        console.error(err); 
      })

       }, 2000);
     
    },
    
   
      
  }
  })
</script>
</body>
</html>